﻿using System;

using System.IO;

using System.Threading.Tasks;

namespace _2.ConcatenatesTwoTextFiles
{
    class ConcatenatesTwoTextFiles
    {
        static void Main(string[] args)
        {

            StreamReader readerFirst = new StreamReader(@"..\..\ConcatenatesTwoTextFiles.cs");
            string firstText;
            using (readerFirst)
            {
                firstText = readerFirst.ReadToEnd();
            }
            StreamReader secondReader = new StreamReader(@"..\..\ConcatenatesTwoTextFiles.cs");
            string secondText;
            using (readerFirst)
            {
                secondText = secondReader.ReadToEnd();
            }
            StreamWriter resultWrite = new StreamWriter("result.txt");
            using (resultWrite)
            {
                resultWrite.WriteLine(firstText);
                resultWrite.WriteLine(secondText);
            }
        }
    }
}
